Maximum-likelihood correlation